package com.wulian.common.euums;

import lombok.Getter;
import lombok.Setter;

/**
 * 
* @ClassName: MonitorPointEnum 
* @Description: TODO(监测点枚举类) 
* @author 马志豪
* @date 2019年10月16日 下午2:14:56 
*
 */
public enum MonitorTypeEnum {
	//指标类型
	MONITOR_TYPE_ONE("0","水质"),
	MONITOR_TYPE_TWO("1","水量"),
	MONITOR_TYPE_THREE("3","液位"),
	MONITOR_TYPE_FOUR("2","设备"),
	MONITOR_TYPE_FIVE("4","其他");
	@Getter
	@Setter
	private String code;
	@Getter
	@Setter
	private String value;
	
	private MonitorTypeEnum(String code, String value) {
		this.code = code;
		this.value = value;
	}


	/**
     * 根据code获取去value
     * @param code
     * @return
     */
    public static String getValueByCode(String code){
        for(MonitorTypeEnum monitorTypeEnum:MonitorTypeEnum.values()){
            if(code.equals(monitorTypeEnum.getCode())){
                return monitorTypeEnum.getValue();
            }
        }
        return  null;
    }
	
}
